import React, {Component} from 'react';
import {StickyContainer, Sticky} from 'react-sticky';

import {NavBar, Tabs, Icon} from 'antd-mobile';
import './info.scss'

class SafeInfo extends React.Component {
    renderContent = tab => {
        return

    }
    onTabClick = (tab, index) => {
        console.log(index);
    }
    riskDesc = (id) => {
        this.props.history.push({
            pathname: `/safeRiskInfo/${id}`,
        })
    }
    render() {




        const goBack = () => {
            var u = navigator.userAgent;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
            if (isAndroid) {
                android.back()
            } else {
                var message = {"method": "back"};
                window.webkit.messageHandlers.ios.postMessage(message);
            }
        }
        return (
            <div style={{position: 'relative'}}>
                <NavBar mode="light"
                        onLeftClick={() => goBack()}
                        icon={<Icon type="left"/>}
                        className='title'>新手指南</NavBar>

                <div className={'list-warp'}>
                    <div className={'list-items'} onClick={() => this.riskDesc(1)}>
                        <div className={'item-title'}>
                            <div
                                className={'title-name'}>升值空间资金存管银行金城银行已通过存管测评白名单升值空间资金存管银行金城银行已通过存管测评白名单升值空间资金存管银行金城银行已通过存管测评白名单
                            </div>
                            <p className={'time'}>2018-11-30</p>
                        </div>
                        <div className={'item-img'}></div>
                    </div>
                </div>
                {/*<div className={'tip'}>网贷有风险，出借须谨慎</div>*/}
            </div>
        );
    }
}

export default SafeInfo
